Skip to content

Conversation

@rlundeen2
Copy link
Contributor

Refactored registry logic into a shared pyrit.registry module and added a new ScorerRegistry for managing pre-configured scorer instances.

Changes

  • Abstracted common registry patterns into registry module with base classes for class registries (Type[T]) and instance registries (pre-configured objects)
  • Migrated ScenarioRegistry and InitializerRegistry to inherit from BaseClassRegistry
  • Added ScorerRegistry extending BaseInstanceRegistry for managing scorer instances
  • Added documentation in registry with overview and usage examples

Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsurprisingly, I like practically everything about this 😆

Copy link
Contributor

@ValbuenaVC ValbuenaVC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing I think we may want to add before merging is encoding/decoding logic for registries. The protocol choice is fantastic, but it requires every registry to store classes or instances differently. Aside from that looks great!

@rlundeen2 rlundeen2 merged commit b029f02 into Azure:main Jan 11, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants